package com.sc.auction.pay.Config;


import lombok.Data;

import java.io.FileWriter;
import java.io.IOException;

@Data
public class AlipayConfig {

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118642373";
    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCPQkh0KDu5A0sehpyKK2gLWzOUDqFB7tNO//BASWsNzTSA9G5yh31596U8mj79DssyN5fx3KvTU5xoeNHmEzmk2c+T/mNaF3+huq7aQ8QpY2bGdZZahntAmbQh7a/NVQwH1kEBlzcrKMlPZv5DPvm59WgJRD7eIiSt14yMzr0hXBHk8qz2W8wyM+WDH5yjPDoupj3v/96lQyDpk5P9ia0dxlNExJ2JK+ayNAL84ijWpYqVhtLs5OzZph509lYcabYAY8I70A96iZHzK0Le2JOTIbo/hqMHX4fF3ES1F4kg0wVf8+BRwuG607Ghi7zaxzW8wzfey3Obwcn8ZReoaIt1AgMBAAECggEAUMY2xAfLZM4OlO+hY+aFi6Gou1pkYiCe1HRKqnS6/9UsPWmUvM7YWOThLgJqcZTdzTq7WYvq9gS2s9EryGYeomyNNgzBSBLny/DOlhKPkCaT1GKInBInfI0tm9PAxC2n0uNjU9pHKPaeSz7vLktb0xYjytXH/MeTltFqVhpbWWsQKLZ5anWOtoYt6LMGM3B6asNoVvTQByijz728148R1oWZI9QNSRqKGBO13iw9wlkH8+5LPsDvueL8FM12Z1OUAKA8QZW7rm4MmvMyhkjBVm95HScqPd4cCfZ4pBI2vPLuOLKgYVDGZKHWVMBina/RUuDdWZj5oQDsCSb3OxneIQKBgQDHecsQHFS5qhFUCx6HnP/kj1c6NukezsT5h2hkTzfdKIoQm0ryw1iMdjOLc6r3UsDz9ZSFBABLXxnHA6CeRkIM7JZx+6kC8oL2RNSW1OXNjniS4z9b2AuN5z5atenG1pUgmy6LHpMuumHUV6k5Rg7+99mUJT6GBgX6HbR86oUyBwKBgQC32nQ/kV/2kfdrEXb5mbniCthGxM2K02Jr8HwgvEJW7iUmuAP+7MoTG7SNI1VC0SlMGgAqdZVxBOvZk/azUGemuG9khdx323syl3M7hPcZYWDUXBw36JsD9MTNmju0xcTFmHtV1nSJc8dq2XCfo3H/4amDZV/Kiy+ANllBOAiHowKBgQCveeC8h2+w9H7R5AYzXlVthvtA5tUkmNiGeivHMjj+gI8UFMhVzqqyxbiKUHJxp4a+FadVbDOmGj7e573//eZU4Dtoge4n/ZZfdiVdmmOd9Fr1PJub++4OIwKjYawJkvMU/+5ty7PGQ4eT+JmRHKRMf1QUEr9xvxK6+C6yRMxvOQKBgEeSkpjAllQd5OzYgrGOh8+YmzOJn97AhdsxZpEz2LuQwAO/tUaDlfM0YOhk7ecyF9qZcKEW31N9L/em425RCdjcifjfJ8G9PsumK+Tq0Wse/pwNM6sMMXSr0AWeWkn4h67IupLjBsEPwn01IuPytAmCJwSQ7WajIp3OCpcaIi/zAoGATOs+RFtL3Tk1PBBFibF9ghKJUwfYOAulJ2hBIJfRjGum17Xlus8X6h5KViK7xnJ383Uh/vZkpt8FcZcwltKMxq4i8B1kDTg9AiCLjPC/AWjogdXfqrxk1ZzuDZQJwBQZOhVO0GZKmgXjxQeIUkrldKc2dIh2JZA7uYYdeye1Gas=";
    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAilv0tnNfSnQjo4RiVyZpMGwDFcDvkeu4ImROgeJ4VyPr9rKcEfMauw1tlAHT2XNEyAlb/h+g+YHcK3we0u80poJybeXzk70wxQvV0sv3zQouj/rKgB9VUFVxe/8yIspkGGkTAvPgThL/2ji53SEVYs8CEfxgykWhnPBq/MTwutlzBALbboDKyRR82zF143AiM/c/r1tGWPoMRwd2cyDVUb0kyZIItJLph3gcFRCHcK3FCzVhElbF1Jn0i5nq6aVjzdQrJuu3li7WM3hvg7m1F28uCba46E55+uccY6CqDuuhtAYSUNY/QGJ4TNaw46cnbM4HCbSnGB17eqbtxNiciQIDAQAB";
    // 服务器异步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://localhost:8085/alipay.trade.page.pay-JAVA-UTF-8/notify_url.jsp";
    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://localhost:8085/alipay.trade.page.pay-JAVA-UTF-8/return_url.jsp";
    // 签名方式
    public static String sign_type = "RSA2";
    // 字符编码格式
    public static String charset = "utf-8";
    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
    // 支付宝网关
    public static String log_path = "C:\\";

    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
